<?php

// 处理退出逻辑

require __DIR__ . '/../bootstrap.php';

if ($_SERVER['REQUEST_METHOD'] != 'POST') {
    trigger_error("只允许POST方式请求", E_USER_ERROR);
}

if (!session_destroy()) {
    show_msg_exit('退出失败');
}

show_msg_exit('退出成功', './login.php');
